//
//  HYQViewController.m
//  HYQPhotoBrowser
//
//  Created by zxj1989 on 09/11/2018.
//  Copyright (c) 2018 zxj1989. All rights reserved.
//

#import "HYQViewController.h"
#import "HYQPhotoBrowser.h"

@interface HYQViewController ()

@property (nonatomic, strong) HYQPhotoBrowser *browser;

@end

@implementation HYQViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    
}


- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    NSMutableArray *arr = [NSMutableArray arrayWithCapacity:0];
    NSArray *photos = @[@"https://img.hotyq.com/user/53/760/176053/341f0f09e6204163873888c4eaac0362.jpg",@"https://img.hotyq.com/user/53/760/176053/341f0f09e6204163873888c4eaac0362.jpg",@"https://img.hotyq.com/user/53/760/176053/341f0f09e6204163873888c4eaac0362.jpg"];
    for (NSString *url in photos) {
        MWPhoto *ph = [MWPhoto photoWithURL:[NSURL URLWithString:url]];
        [arr addObject:ph];
    }
    self.browser = [[HYQPhotoBrowser alloc] init];
    [self.browser showPhotos:arr index:1 animatedFromView:nil inCtrl:self];
}


- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
